<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<title></title>
<jsp:include page="inshead.jsp"></jsp:include>
<body>
	<div id="monthReport_head" data-options="region:'north'"
		style="height:90px;">
		<table cellspacing="20">
			<tr>
				<td><a id="btn" href="#" class="easyui-linkbutton" text="月销售统计"
					param="mreport_countYear" url="saleorder!showMonthReport.action?year=">月销售统计</a>&nbsp;<input
					id="mreport_countYear" type="number" value="2015"></td>
				
			</tr>
		</table>
	</div>
	<div id="monthReport_mainPanle"
		data-options="region:'center',split:true">
		<div id="monthReport_tabs" class="easyui-tabs"
			data-options="fit:true, border: false" style="height: 800px">
			
		</div>
	</div>


	<script>
		$("#monthReport_head a").click(function() {
			var text = $(this).attr("text");
			var url = $(this).attr("url");

			var param = $(this).attr("param");

			if (param != undefined) {
				var val = $("#" + param).val();
				if (val == undefined || val == "") {
					alert("请先填写参数");
					return;
				}

				url = url + $("#" + param).val();
			}

			monthReport_openTab(text, url);
		});

		function monthReport_openTab(title, url) {

			//新增tab
			$('#monthReport_tabs').tabs('add', {
				title : title,
				closable : true,
				content : createTabContent(url)
			});
			function createTabContent(url) {
				return '<iframe style="width:100%;height:98%;" scrolling="auto" frameborder="0" src="'
						+ url + '"></iframe>';
			}
		}
	</script>

</body>
</html>
